function c = mesh_morph(c, n, tri, opts)
% mesh_morph -  morph the coordinates of a mesh
%
% FORMAT:       c = mesh_morph(c, n, tri, opts)
%
% Input fields:
%
%       c           Cx3 coordinate list (double)
%       n           Cx2 neighbors list (from SRF object, 1-based !)
%       tri         Tx3 triangle list (1-based !)
%       opts        mandatory struct with settings
%        .force     morphing force (1x1 double)
%        .niter     number of iterations (1x1 double)
%                 - optionally provided settings
%        .areac     if 1x1 double := 1, keep area constant
%                   (from initial state, requires .tri to be set!)
%        .type      morph type, currently only {'smooth'} supported
%
% Output fields:
%
%       c           morphed coordinates
%
% This is a MEX (c compiled) function for efficiency.

% Version:  v0.7f
% Build:    8110521
% Date:     Nov-05 2008, 9:00 PM CET
% Author:   Jochen Weber, SCAN Unit, Columbia University, NYC, NY, USA
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% just to make sure
error( ...
    'BVQXtools:MEXMissing', ...
    'This is a compiled function, but the MEX file is missing.' ...
);
